<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>eminfo</title>
<script src="js/select.js" type="text/javascript"></script>
<script src="js/jquery-1.4.4.min.js" type="text/javascript"></script> 
<script src="js/jquery.validate.js" type="text/javascript"></script> 
<script src="js/messages_cn.js" type="text/javascript"></script> 
<script type="text/javascript"> 
$().ready(function() {
	$("#emsinfo").validate({
		rules: {
			sname:{
				required: true,
				minlength:1}			  
					
		   }
		});
	$("#emsinfo2").validate({
		rules: {
		"id":{
			required: true,
			min:1,
			number:true}}	
		});
	$("#emsinfo3").validate({
		rules: {
			
		"sphone":{
			required: true,
			min:1,
			number:true
			}
					  
					
		   }
		});
	});
</script> 	
<style type="text/css"> 
.infotitle {
width:80px;
}
.infono td{
border: 0px dashed #D4D4D4;
}

</style> 
</head>
<body>

<div id="main">

<h3>员工信息</h3>
<p></p>
 <table class="infono" >
 <tr>
 <td>快速查找</td>
 </tr>
      <tr>
        <td><form action="hremAction!searchByName" method="get" id="emsinfo"><input type="text" name="sname" /><input type="submit" value="姓名" /></form></td>
        
        <td><form action="hremAction!searchById" method="get" id="emsinfo2" ><input type="text" name="id" /><input type="submit" value="ID" /></form></td>
	
        <td><form action="hremAction!searchByPhone" method="get" id="emsinfo3" ><input type="text" name="sphone" /><input type="submit" value="电话" /></form></td>
       
      </tr>
    </table>

<p>
<a href="hremAction!emPageList">显示所有员工</a>
<a href="employeesearch.jsp">高级查找</a>
</p>
<div>
<form action="hremAction!deletese" method="post">
<table>
	<tr>
		<td>选择</td>
		<td class="infotitle">ID</td>
		<td class="infotitle">姓名</td>
		<td class="infotitle">性别</td>
		<td class="infotitle">年龄</td>
		<td class="infotitle">文化程度</td>
		<td class="infotitle">电话</td>
		<td class="infotitle">部门</td>
		<td class="infotitle">删除</td>
		<td class="infotitle">修改</td>
		<td class="infotitle">查看更多</td>
	</tr>

	<s:iterator value="pagelist.list">

		<tr>
			<td><input type="checkbox" name="ids"  value="<s:property value="id" />" /></td>
			<td><s:property value="id" /></td>
			<td><s:property value="name" /></td>
			<td><s:property value="sex" /></td>
			<td><s:property value="age" /></td>
			<td><s:property value="education" /></td>
			<td><s:property value="telphone" /></td>
			<td><a href="部门action?id=<s:property value="myeDepartment.id" />"><s:property value="myeDepartment.name" /></a></td>
			<td><a href="hremAction!delete?id=<s:property value="id" />">delete</a></td>
			<td><a href="hremAction!edit?id=<s:property value="id" />">modify</a></td>
			<td><a href="hremAction!showem?id=<s:property value="id" />">more</a></td>

		</tr>



	</s:iterator>


</table>
<s:if test="%{null!=pagelist}">
  <div> <span>全选</span>

      <input id="checkall" type="checkbox" class="checkbox" onchange="selectall()"/>

      <span>取消全选</span>

      <input id="checkcan" type="checkbox" class="checkbox" onclick="cancelselectall()"/>

      <span>反转</span>

      <input id="checkcfan" type="checkbox" class="checkbox" onclick="selectfan()"/>
	  <input type="submit" value="删除所选" />
    </div>
 </s:if>

</form>
<s:if test="%{ids!=null}">
	 id为<s:property value="ids" />的员工已经被删除
	</s:if>

</div>

<!-- 
<s:property value="#request.get('javax.servlet.forward.servlet_path')" /> 
<s:property value="#request.get('javax.servlet.forward.query_string')" /> 
 <s:property value="#request['javax.servlet.forward.query_string']"/>   
 <s:url var="pageurl2" value="hremAction!%{pagelist.actionname}?pagelist.pageNum=" />
 
 <s:property value="pagelist.url" /><s:property value="pagelist.para" />pagelist.pageNum=<s:property value="pagelist.pageNum" />

 -->
 <div id="nav">
<s:if test="%{pagelist.pageNum!=1}">
<s:a href="%{pagelist.url}%{pagelist.para}pagelist.pageNum=%{pagelist.pagePreNum}">上一页</s:a>
</s:if>

<s:iterator value="pagelist.pageNums" status="st">
<s:if test="%{pagelist.pageNum==#st.index+1}">
<s:property/>
</s:if>
<s:else>
<s:a href="%{pagelist.url}%{pagelist.para}pagelist.pageNum=%{#st.index+1}"><s:property/></s:a>
</s:else>
</s:iterator>
<s:if test="%{pagelist.pageNum!=pagelist.pageTotalCount}">
<s:a href="%{pagelist.url}%{pagelist.para}pagelist.pageNum=%{pagelist.pageNextNum}">下一页</s:a>
</s:if>
</div>


</div>
<s:debug></s:debug>
	
</body>
</html>